package com.fang.study;

import com.fang.study.spi.Log;

import java.util.ServiceLoader;

/**
 * @author fanglingxiao
 * @version 1.0
 * @description TODO
 * @date 2021/12/21 9:30 下午
 **/
public class Test04_SPI {

    public static void main(String[] args) {
        ServiceLoader<Log> serviceLoader = ServiceLoader.load(Log.class);
        for (Log spiLog : serviceLoader) {
            spiLog.log("spi");
        }
    }
}
